//
//  MGServiceProvider.h
//  Express
//
//  Created by lhongl on 2025/9/28.
//  Copyright © 2025 QM. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface MGServiceProvider : NSObject

/// 注册
/// - Parameters:
///   - cls: 类
///   - protocol: 协议
+ (void)registerServiceClass:(Class)cls serviceProvider:(Protocol *)protocol;


/// 通过协议获取类
/// - Parameter protocol: 协议
+ (Class)serviceClassForProvider:(Protocol *)protocol;


/// 通过协议获取实例
/// - Parameter protocol: 协议
+ (id)serviceInstantiationClassForProvider:(Protocol *)protocol;

@end

NS_ASSUME_NONNULL_END
